package com.xdcplus.web.common.enums.craft;

//点检工单状态：1-未开机、2-待点检、3-点检完成、4-点检关闭
public enum CraftCheckOrderTargetCheckStatusEnum {
    // 数据操作错误定义
    NotTurnedOn(1L, "未开机"),
    NotStarted(2L, "待点检"),
    COMPLETE(3L, "点检完成"),
    CLOSE(4L, "点检关闭"),
    ;

    private Long code;

    private String msg;

    public static String getMsg(Long code) {
        for (CraftCheckOrderTargetCheckStatusEnum ele : values()) {
            if(ele.getCode().equals(code)) {return ele.getMsg();}
        }
        return null;
    }

    CraftCheckOrderTargetCheckStatusEnum(Long code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Long getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
